package model

import (
	"gorm.io/gorm"
	"time"
)

type Friends struct {
	Id        int64          `gorm:"column:id;type:bigint(20);primaryKey;not null;" json:"id"`
	SendId    int64          `gorm:"column:send_id;type:bigint(20);comment:请求人;not null;" json:"send_id"`       // 请求人
	ReceiveId int64          `gorm:"column:receive_id;type:bigint(20);comment:接收人;not null;" json:"receive_id"` // 接收人
	CreatedAt time.Time      `gorm:"column:created_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
}

func (f *Friends) TableName() string {
	return "friends"
}
